package com.bjsxt.chapter11_flyWeight;

/**
 * @ClassName Client
 * @Description 客户端类
 * @Author 黑马程序员
 * @Date 15:58 2024/6/22
 * @Version 1.0
 **/
public class Client {

    public static void main(String[] args) {
        ChessFlyWeight blackChess1 = ChessFlyWeightFactory.getChess("黑色");
        ChessFlyWeight blackChess2 = ChessFlyWeightFactory.getChess("黑色");

        System.out.println(blackChess1);
        System.out.println(blackChess2);

        System.out.println("-----增加外部状态的处理-----");
        blackChess1.display(new Coordinate(10,10));
        blackChess2.display(new Coordinate(20,20));

    }
}
